Home

Operator Usage

Name

srotate-right

Description

srotate-right input-seq
rotate the input sequence right one step

srotate-right[n] input-seq
rotate the input sequence right n steps, modulus size(input-seq)


Examples

srotate-right (|one> . |two> . |three> . |four> . |five>)
    |five> . |one> . |two> . |three> . |four>

srotate-right[3] (|one> . |two> . |three> . |four> . |five>)
    |three> . |four> . |five> . |one> . |two>

-- 11 mod 5 == 1, so rotate right 1 step:
srotate-right[11] (|one> . |two> . |three> . |four> . |five>)
    |five> . |one> . |two> . |three> . |four>


See also

Operator type

core normal, core compound